package 
{
    import flash.display.Bitmap;
    import flash.display.BitmapData;
    import flash.display.Shape;
    import flash.display.Sprite;
    import flash.events.Event;
    import flash.events.IEventDispatcher;
    import flash.events.MouseEvent;
    import flash.events.ProgressEvent;
    import flash.geom.Point;
    import flash.geom.Rectangle;
    import flash.net.URLRequest;
    import flash.utils.Timer;
	import flash.events.TimerEvent;

	// see http://code.google.com/p/as-hive for more about HIVE
    
    import org.hive.display.LoaderData;
    import org.hive.display.utils.LoaderSet;
    import org.hive.managers.plugin.LayoutManager;
    import org.hive.managers.plugin.LoadManager;
    import org.hive.sequence.ActionSequence;
    import org.hive.sequence.CloseSequence;
    import org.hive.state.IState;
    import org.hive.state.State;
    
    import PhysicsWorld;
  	
  	
  	// BOX2D
  	  
    import Box2D.Dynamics.*;
	import Box2D.Collision.*;
	import Box2D.Collision.Shapes.*;
	import Box2D.Common.Math.*;


    public class MeteorExperiment extends State implements IState
    {
    	
    	private var ldm:LoadManager;  
    	private var lm:LayoutManager; 
    	
    	
        public function create():ActionSequence
        {
            
     	 	ldm = LoadManager.init(hive);
      	 	lm = LayoutManager.init(hive, hive.canvas);
               
            var seq:ActionSequence = new ActionSequence('Main');
            
            createPhysicsWorld();

            return seq;
        }
        
        public function close():CloseSequence
        {
            return null;
        }        
              
        
        private function createPhysicsWorld():void
        {
        	lm.addChild( new PhysicsWorld() );
        }
        
    }
}